<template>
  <div class="app-container" >
    <el-table v-loading="loading" :data="contactList" >
      <el-table-column label="姓名" align="center" prop="name" fixed />
     <el-table-column label="性别" align="center" prop="sex">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
        </template>
      </el-table-column>
      <el-table-column label="手机号码" align="center" prop="phone" />
      <el-table-column label="职务" align="center" prop="position" />
      <el-table-column label="关系等级" align="center" prop="relationshipLevel">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.zxcrm_relationship_level" :value="scope.row.relationshipLevel"/>
        </template>
      </el-table-column>
      <el-table-column label="籍贯" align="center" prop="nativePlace" />
      <el-table-column label="生日" align="center" prop="birthday" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="态度类别" align="center" prop="attitudeCategory">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.zxcrm_attitude_category" :value="scope.row.attitudeCategory"/>
        </template>
      </el-table-column>
      <el-table-column label="直属上司" align="center" prop="immediateSupervisorId" >
        <template slot-scope="scope">
          {{contactMap[scope.row.immediateSupervisorId]}}
        </template>
      </el-table-column>
      <el-table-column label="沟通风格" align="center" prop="communicationStyle">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.zxcrm_communication_style" :value="scope.row.communicationStyle"/>
        </template>
      </el-table-column>
     <el-table-column label="对对接人的要求" align="center" prop="contactPersonRequire" />
      <el-table-column label="对供应商的要求" align="center" prop="supplierRequire" />
      <el-table-column label="兴趣爱好" align="center" prop="hobby" />
      <el-table-column label="往期履历" align="center" prop="previousResume" />
      <el-table-column label="抽烟情况" align="center" prop="smokingSituation" />
      <el-table-column label="喝酒情况" align="center" prop="drinkingSituation" />
      <el-table-column label="婚姻状况" align="center" prop="maritalStatus">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.zxcrm_marital_status" :value="scope.row.maritalStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="家庭情况" align="center" prop="familySituation" />
      <el-table-column label="社会关系说明" align="center" prop="socialRelationshipsExplanation" />
      <el-table-column label="邮件地址" align="center" prop="mailingAddress" />
      <el-table-column label="家庭住址" align="center" prop="homeAddress" />
      <el-table-column label="其他备注" align="center" prop="otherRemarks" />
      <el-table-column label="决策角色" align="center" prop="decisionRole">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.zxcrm_decision_role" :value="scope.row.decisionRole"/>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { listContact, listAllContact} from "@/api/zxcrm/contact"
  export default{
    name:"contactInfo",
    dicts: ['zxcrm_relationship_level', 'zxcrm_communication_style', 'zxcrm_attitude_category', 'zxcrm_decision_role', 'sys_user_sex', 'zxcrm_marital_status'],
    props:{
      contactList:{
        default:[]
      },
      contactMap:{
        default:null
      },
      loading:{
        type:Boolean,
        default:false
      },

    },
    data() {
      return{

      }
    },
    created(){
    },
    methods:{
    }

  }
</script>

<style>
</style>
